home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
RMTP03.ARJ
/
READXGF.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-02-25
|
989b
|
29 lines
Program ReadXgf;
Uses Graph;
Var
F : File;
Img : Pointer;
Size : LongInt;
Gd : Integer;
Gm : Integer;
Begin
Gd:=EGA;
Gm:=EGAHi;
InitGraph(Gd,Gm,''); (* Set path where EGAVGA.BGI *)
(* is located *)
SetFillStyle(SolidFill,Blue);
Bar(0,0,639,349);
Assign(F,'GCAR.XGF'); (* Gcar.xgf must be in current directory *)
Reset(F,1);
Size:=FileSize(F); (* Get size of file, must 64K or less *)
GetMem(Img,Size); (* Allocate memory *)
BlockRead(F,Img^,Size); (* Read contents of file into buffer *)
Close(F);
PutImage(300,150,Img^,NormalPut); (* Display image *)
FreeMem(Img,Size); (* Free memory *)
Readln; (* Wait for enter key *)
CloseGraph; (* Close graphics *)
End.